<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/container"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#DF0D1117"
        android:padding="16dp"
        tools:context=".presentation.ui.fragments.LoginFragment">

        <RelativeLayout
            android:id="@+id/relativeLayout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="220dp"
            android:background="#0D0D1117"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="1.0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent">

            <EditText
                android:id="@+id/username"
                style="@style/inputStyle"
                android:layout_width="300dp"
                android:layout_height="55dp"
                android:layout_alignParentStart="true"
                android:layout_alignParentTop="true"
                android:layout_alignParentEnd="true"
                android:layout_marginTop="20dp"
                android:autofillHints=""
                android:background="@drawable/rounded_edittext"
                android:hint="@string/prompt_email"
                android:inputType="textEmailAddress"
                android:minHeight="48dp"
                android:paddingStart="10dp"
                android:selectAllOnFocus="true"
                android:drawableEnd="@drawable/login_mail"
                android:textColor="@color/md_theme_dark_inverseOnSurface"
                android:textColorHint="@color/login_grey"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <EditText
                android:id="@+id/password"
                style="@style/inputStyle"
                android:layout_width="match_parent"
                android:layout_height="55dp"
                android:layout_below="@+id/username"
                android:layout_marginTop="10dp"
                android:autofillHints=""
                android:background="@drawable/rounded_edittext"
                android:hint="@string/prompt_password"
                android:imeActionLabel="@string/action_sign_in_short"
                android:drawableEnd="@drawable/login_lock"
                android:imeOptions="actionDone"
                android:inputType="textPassword"
                android:minHeight="48dp"
                android:selectAllOnFocus="true"
                android:textColorHint="@color/login_grey"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/username" />

            <Button
                android:id="@+id/login"
                style="@style/buttonStyle"
                android:layout_width="match_parent"
                android:layout_height="55dp"
                android:layout_below="@+id/password"
                android:text="@string/action_sign_in"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/password"
                app:layout_constraintVertical_bias="0.2" />

            <Button
                android:id="@+id/google_login"
                style="@style/buttonStyle"
                android:layout_width="match_parent"
                android:layout_height="55dp"
                android:layout_below="@+id/login"
                android:layout_marginTop="10dp"
                android:text="@string/google_login" />

            <Button
                android:id="@+id/registration_button"
                style="@style/buttonStyle"
                android:layout_width="match_parent"
                android:layout_height="55dp"
                android:layout_below="@+id/google_login"
                android:layout_marginTop="10dp"
                android:text="@string/registration_button" />

            <ProgressBar
                android:id="@+id/loading"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="32dp"
                android:layout_marginTop="64dp"
                android:layout_marginEnd="32dp"
                android:layout_marginBottom="64dp"
                android:visibility="gone"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="@+id/password"
                app:layout_constraintStart_toStartOf="@+id/password"
                app:layout_constraintTop_toTopOf="parent"
                app:layout_constraintVertical_bias="0.3" />
        </RelativeLayout>

        <ImageView
            android:id="@+id/imageView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintHorizontal_bias="1.0"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            app:layout_constraintVertical_bias="0.0"
            app:srcCompat="@drawable/login_intro" />

        <TextView
            android:id="@+id/textView"
            style="@style/titleStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:gravity="center"
            android:text="@string/Welcome"
            android:textColor="@color/bgColor"
            android:textSize="21sp"
            app:layout_constraintBottom_toBottomOf="@+id/imageView"
            app:layout_constraintEnd_toEndOf="@+id/imageView"
            app:layout_constraintHorizontal_bias="0.339"
            app:layout_constraintStart_toStartOf="@+id/imageView"
            app:layout_constraintTop_toTopOf="@+id/imageView"
            app:layout_constraintVertical_bias="0.63" />

        <TextView
            android:id="@+id/textView2"
            style="@style/titleStyle"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="164dp"
            android:gravity="center"
            android:text="@string/LoginInYourAcc"
            android:textColor="@color/bgColor"
            app:layout_constraintEnd_toEndOf="@+id/imageView"
            app:layout_constraintHorizontal_bias="0.204"
            app:layout_constraintStart_toStartOf="@+id/imageView"
            app:layout_constraintTop_toTopOf="@+id/imageView" />
    </androidx.constraintlayout.widget.ConstraintLayout>
</layout>